[PowerShell] Input encoding

Posted by Andy on Stack Overflow See other posts from Stack Overflow or by Andy
Published on 2010-05-25T07:47:40Z Indexed on 2010/05/25 7:51 UTC
Read the original article Hit count: 246

Filed under:
|

Hi! I need to get output of native application under PowerShell. The problem is, output is encoded with UTF-8 (no BOM), which PowerShell does not recognize and just converts those funky UTF chars directly into Unicode.

I've found PowerShell has $OutputEncoding variable, but it does not seem to affect input data.

Good ol' iconv is of no help either, since this unnecessary UTF8-as-if-ASCII => Unicode conversion takes place before the next pipeline member acquires data.

© Stack Overflow or respective owner

Related posts about encoding

Related posts about powershell